package com.ruoyi.home.domain;

import java.util.List;
import java.util.Objects;

/**
 * @author 梁国瑞
 * @version 1.0
 */
public class ScheduleVo {
    // 员工ID
    private Long employeeId;
    // 员工姓名
    private String name;
    // 部门名称
    private String deptName;
    // 本月日报记录列表
    private List<DailyReport> dailyReports;

    // 内部类，表示单条日报记录
    public static class DailyReport {
        // 今日工作内容
        private String work;
        // 明日工作计划
        private String plan;
        // 报告日期
        private String date;

        public String getWork() {
            return work;
        }

        public void setWork(String work) {
            this.work = work;
        }

        public String getPlan() {
            return plan;
        }

        public void setPlan(String plan) {
            this.plan = plan;
        }

        public String getDate() {
            return date;
        }

        public void setDate(String date) {
            this.date = date;
        }

        @Override
        public boolean equals(Object o) {
            if (o == null || getClass() != o.getClass()) return false;
            DailyReport that = (DailyReport) o;
            return Objects.equals(work, that.work) && Objects.equals(plan, that.plan) && Objects.equals(date, that.date);
        }

        @Override
        public int hashCode() {
            return Objects.hash(work, plan, date);
        }
    }

    public Long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public List<DailyReport> getDailyReports() {
        return dailyReports;
    }

    public void setDailyReports(List<DailyReport> dailyReports) {
        this.dailyReports = dailyReports;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        ScheduleVo that = (ScheduleVo) o;
        return Objects.equals(employeeId, that.employeeId) &&
                Objects.equals(name, that.name) &&
                Objects.equals(deptName, that.deptName) &&
                Objects.equals(dailyReports, that.dailyReports);
    }

    @Override
    public int hashCode() {
        return Objects.hash(employeeId, name, deptName, dailyReports);
    }
}